package com.guofen.dao;

import com.guofen.pojo.HsmSmallWorm;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface HsmSmallWormMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(HsmSmallWorm record);

    int insertSelective(HsmSmallWorm record);

    HsmSmallWorm selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(HsmSmallWorm record);

    int updateByPrimaryKey(HsmSmallWorm record);

    //返回1-1当天最新一条数据
    List<Map<String, HsmSmallWorm>> getHatchingFeedLatest();

    //返回3-1当天最新一条数据
    List<Map<String, HsmSmallWorm>> getHatchedMaterialLatest();

    //返回还未填写过3-1内容的n条数据
    List<Map<String, HsmSmallWorm>> getHatchedMaterialList();

    //返回1-2当天最新一条数据
    List<Map<String, HsmSmallWorm>> getSmallWormBreedingFeedLatest();

    //返回已填写3-1，还未填写过1-2内容的n条数据
    List<Map<String, HsmSmallWorm>> getSmallWormBreedingFeedList();

    //返回已填写3-1，还未填写过1-2内容的n条数据(已进行加料)
    List<Map<String, HsmSmallWorm>> getSmallWormBreedingFeedList1();

    //返回3-2当天最新一条数据
    List<Map<String, HsmSmallWorm>> getSmallWormBreedingMaterialLatest();

    //返回已填写3-1，1-2，还未填写过3-2内容的n条数据
    List<Map<String, HsmSmallWorm>> getSmallWormBreedingMaterialList();

    //返回进料日期情况
    Map<String, HsmSmallWorm> getDate(Integer id);

    List<HsmSmallWorm> selectAll();

    List<HsmSmallWorm> selectByDate(@Param("startDate") String startDate,
                                                 @Param("endDate") String endDate);
}